package wwl.lsf.hellospringboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/cors")
public class CorsController {

  @GetMapping
  public String test() {
    return "cors/index";
  }

  @GetMapping("/query")
  @ResponseBody
  public String corsquery(@RequestParam String name) {
    return name;
  }

}
